#!/bin/bash

#HOST_NAME

#服务名
SERVICE_NAME="gateway"
#前一天日志
DATE_STR=$(date -d last-day +%Y%m%d)
#需要迁移目录
TARGET_DIR="/home/logonuser/logs/${SERVICE_NAME}/${DATE_STR}"
#日志移动目录
BACKUP_DIR="/home/logonuser/backup_dir/18/${SERVICE_NAME}/${DATE_STR}"

echo $TARGET_DIR
for(ls )


#3.迁移备份,每两周执行一次
#if [ $flag -eq 1 ];then
#	for dir in ${clean_dir[*]}
#	do
#		if [ -d $dir ]; then
#			#构建迁移目录
#			if [ ! -d $backup_dir$dir ];then
#				mkdir -p $backup_dir$dir
#			fi
#			#文件迁移
#			for file in `find $dir -type f -mtime +$keep_days -exec ls {} \;`
#			do
#				mv $file $backup_dir$dir
#			done
#		fi
#	done
#fi